package com.thirdpartylogin.knowsolver.util;

import com.thirdpartylogin.callcenter.enums.AppException;
import com.thirdpartylogin.callcenter.enums.AppExceptionCodeMsg;


public class AIDecisionInvocation {
    private String titleId;
    private String userId;
    private String cent;
    private Integer quota;


    //构造函数
    public AIDecisionInvocation(String titleId, String userId, String cent, Integer quota) {
        this.titleId = titleId;
        this.userId = userId;
        this.cent = cent;
        this.quota = quota;
    }

    //星火V1.5
    public void xhV1(String aiId) throws Exception {
        BigModelNew bigModelNew=new BigModelNew(this.userId,aiId,this.titleId,this.quota,true);
        bigModelNew.ai(this.cent);
    }

    //星火V2.0
    public void xhV2(String aiId) throws Exception{
        BigModelNewV2 bigModelNewV2=new BigModelNewV2(this.userId,aiId,this.titleId,this.quota,true);
        bigModelNewV2.ai(this.cent);
    }

    //星火V3.0
    public void xhV3(String aiId) throws Exception{
        BigModelNewV3 bigModelNewV3=new BigModelNewV3(this.userId,aiId,this.titleId,this.quota,true);
        bigModelNewV3.ai(this.cent);
    }

    //星火V2.5
    public void xhV3_5(String aiId) throws Exception{
        BigModelNewV3_5 bigModelNewV3_5=new BigModelNewV3_5(this.userId,aiId,this.titleId,this.quota,true);
        bigModelNewV3_5.ai(this.cent);
    }

    //判断使用ai
    public void AIUsageEvaluation(String aiId,String title) throws Exception {
        switch (title){
            case "星火1.5":
                xhV1(aiId);
                break;
            case "通义千问":
                break;
            case "星火2.0":
                xhV2(aiId);
                break;
            case "星火V3.0":
                xhV3(aiId);
                break;
            case "星火V3.5":
                xhV3_5(aiId);
                break;
            default:
                throw new AppException(AppExceptionCodeMsg.AI_NOT);
        }


    }
}
